using System;
using System.Security.Principal;

namespace BuildBox.Server
{
    public interface IWindowsIdentityAdapter
    {
        string Name
        { 
            get;
        }

        WindowsIdentity Identity
        {
            get;
        }
    }

    public class WindowsIdentityAdapter : IWindowsIdentityAdapter
    {
        public string Name
        {
            get 
            {
                return Identity.Name;
            }
        }

        public WindowsIdentity Identity
        {
            get
            {
                return WindowsIdentity.GetCurrent();
            }
        }
    }
}